<template>

<van-swipe :autoplay="3000">
  <van-swipe-item v-for="(i,index) in swipeList" :key="index">
    <img :src="i.imgSrc" />
  </van-swipe-item>
</van-swipe>

</template>

<script setup lang='ts'>
import {ref} from 'vue'
import { swipeItem,getSwipeList } from '@/service/api/index';

const swipeList = ref<swipeItem[]>([])

getSwipeList().then((res)=>{
  swipeList.value = res.result
})

</script>

<style scoped lang='less'>
img{
  width: 100%;
}
</style>